<html>
<head>
</head>
<body>
{% comment %}novalidate:禁止表单默认校验规则提醒{% endcomment %}
<form action="" method="POST" novalidate>
    {% csrf_token %}
    <p>{{ form_obj.username.label }}:{{ form_obj.username }}
        {{ form_obj.errors.username.0 }}
    </p>
    <p>{{ form_obj.password.label }}:{{ form_obj.password }}
        {{ form_obj.errors.password.0 }}
    </p>
    <p>{{ form_obj.confirm_password.label }}:{{ form_obj.confirm_password }}
        {{ form_obj.errors.confirm_password.0 }}
    </p>
    {% if form_obj.non_field_errors %}
        <div style="color: red; font-weight: bold; border: 1px solid red; padding: 10px; margin-bottom: 15px;">
            {% for error in form_obj.non_field_errors %}
                {{ error }}<br>
            {% endfor %}
        </div>
    {% endif %}
    <p>{{ form_obj.status.label }}:{{ form_obj.status }}
        {{ form_obj.errors.status.0 }}
    </p>
    <p>{{ form_obj.age.label }}:{{ form_obj.age }}
        {{ form_obj.errors.age.0 }}
    </p>
    <p>{{ form_obj.mobile.label }}:{{ form_obj.mobile }}
        {{ form_obj.errors.mobile.0 }}
    </p>
    错误信息汇总在一起显示：
    {{ form_obj.errors }}
    <input type="submit" value="提交">
</form>
</body>
</html>